Page({
  data: {
    acIndex: 0,
    pulling: false,
    name: ''
  },
  sex(e) {
    console.log(e.detail.value);
  },
  submitForm() {
    console.log("提交了表单");
  },
  jg(e){
    console.log(e.detail.value);
  },
  active(e) {
    this.setData({ acIndex: e.mark.key })
  },
  onScrollBottom() {
    console.log(123)
    wx.showLoading({
      title: '加载中',
      mask: true
    })
    wx.request({
      url: 'https://hmajax.itheima.net/api/books',
      method: 'GET',
      data: {
        creator: 'zhangsan'
      },
      complete() {
        wx.hideLoading()
      }
    })
  },
  onScrollPulling() {
    wx.request({
      url: 'https://hmajax.itheima.net/api/books',
      method: 'GET',
      data: {
        creator: 'zhangsan'
      },
      complete: () => {
        setTimeout(() => {
          this.setData({ pulling: false })
        }, 2000)
      }
    })
  }
})